//
//  EPUserField.h
//  UserListDemo
//
//  Created by Pill Gong on 14-1-20.
//  Copyright (c) 2014年 Pill Gong. All rights reserved.
//

#import <UIKit/UIKit.h>
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

#define FONT_SIZE 15.0f
#define VERTICAL_PADDING 3.0f

@class EPUserField;

@protocol EPUserFieldDelegate <NSObject>

- (void)epuserfield:(EPUserField *)userfield selectedIndex:(int)index;
- (void)epuserfield:(EPUserField *)userfield removedIndex:(int)index;
- (void)epuserfieldOnFoucs:(EPUserField *)userfield;
- (void)epuserfieldOnBlur:(EPUserField *)userfield;

@end

@interface EPUserField : UIView <UITextFieldDelegate>
{
    UIView *view;
    NSMutableArray *textArray;
    CGSize sizeFit;
    UIColor *lblBackgroundColor;
}

@property (nonatomic, assign) id<EPUserFieldDelegate> delegate;

@property (nonatomic, strong) UIView *view;
@property (nonatomic, strong) NSMutableArray *textArray;
@property (nonatomic, copy) NSString *defaultLabelText;
@property(nonatomic,copy)NSString *stringTag;// add by wangzhigang at 2014-2-24 处理待办事宜：送下一步处理人为多种类型处理时的标识区分
@property (nonatomic, assign) BOOL deleteActionFail;

- (void)setLabelBackgroundColor:(UIColor *)color;
- (void)setTags:(NSArray *)array;
- (void)display;
- (CGSize)fittedSize;
- (void)addUser:(NSString *)userName;
- (CGFloat)getUserFieldHeight;
- (void)tapGesture;

@end
